<!--# layout("/common/layout.html",{"jsBase":"/js/cms/buyHouseSubsidies/"}){ -->

<form class="layui-form" id="addForm">
    <!--# include("/cms/common/basic.html",{"basic":essentialInformation}){} -->


    <!-- 业务对象须有hidden字段，保存delFlag和version字段-->
    <input type="hidden" id="companyId" name="companyId" value="${essentialInformation.companyId}" class="layui-input">
    <input type="hidden" id="userId" name="userId" value="${essentialInformation.userId}" class="layui-input">

    <fieldset class="layui-elem-field">
        <legend>申报信息</legend>
        <div class="layui-field-box">

            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">人才卡有效时间</label>
                        <div class="layui-input-inline">
                            <input type="hidden" name="cardStartDate" value="${card.startdate, 'yyyy-MM-dd'}">
                            <input type="hidden" name="cardEndDate" value="${card.enddate, 'yyyy-MM-dd'}">

                            <input type="text"  value="${card.startdate,"yyyy-MM-dd"}  至  ${card.enddate,"yyyy-MM-dd"}"   class="layui-input input-readonly" readonly="true">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">积分</label>
                        <div class="layui-input-inline">
                            <input type="text" id="score" value="${card.score}" readonly name="cardScore" class="layui-input input-readonly"
                                   lay-verify="required">
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">申报补贴年次<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <select name="declareYear" id="declareYear" lay-verify="required" lay-filter="declareYear">
                                <option value="">请选择申报补贴年次</option>
                                <option value="1">第一年次</option>
                                <option value="2">第二年次</option>
                                <option value="3">第三年次</option>
                                <option value="4">第四年次</option>
                                <option value="5">第五年次</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">补贴金额<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="declareMoney" readonly name="declareMoney" class="layui-input input-readonly"
                                   lay-verify="required">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">是否在金湾区首次购房<span style="color: red">*</span></label>
                        <layui:simpleDictSelect style='layui-input-inline' type="firstBuyHouse"
                                                id="firstBuyHouse" name="firstBuyHouse"
                                                layVerify="required"/>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">房产证时间<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="advanceLandingTime"  name="advanceLandingTime" class="layui-input input-date"
                                   lay-verify="required">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">特殊情况说明(最多100汉字)</label>
                        <div class="layui-input-inline">
                            <textarea id="specialInstructions" name="specialInstructions"   class="layui-textarea" style="width: 740px" maxlength="200"></textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>
    <fieldset class="layui-elem-field">
        <legend>材料信息</legend>
        <span style="color: red;margin-left: 30px;font-size: 18px">支持文件格式为：pdf,jpg,png,gif，单个文件大小不超过20M。带*号标识的对应资料必须上传，其它资料不作要求。上传文件内容请确保真实清晰、有效，不能有旋转。上传后请查看预览，正确无误后再申报提交。</span>
        <div class="layui-row">
            <label class="layui-form-label file-upload">房产证原件扫描件<span style="color: red">*</span></label>
            <layui:attachment name="roomType" batchFileUUID="${uuid()}" isNew="true" lay-verify="required" bizType="User"/>
        </div>
    </fieldset>
    <input type="hidden" id="Startdate" value="${Startdate, 'yyyy-MM-dd'}">
    <layui:personnelsubmitButtons id="addButton" />
</form>
<!--#} -->
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        var endDate= laydate.render({
            elem: '#advanceLandingTime',//选择器结束时间
            type: 'date',
            min:$("#Startdate").val(),//设置min默认最小值

        });
    });

    layui.use(['add', 'form'], function () {
        var buyHouseSubsidiesAdd = layui.add;
        buyHouseSubsidiesAdd.init();

        var form = layui.form;
        form.on('select(declareYear)', function (data) {
            $("#declareMoney").val(60000);
        });
    });

</script>
